import { isObject } from '../shared/utils'
import { mutableHandler } from './mutableHandler'

function reactive(target){
    // console.log(target)
    return createReactiveObject(target,mutableHandler);
}

function createReactiveObject(target,baseHandler){
    if(!isObject(target)){
        return target;
    }

    const obserber = new Proxy(target,baseHandler);
    return obserber;
}

// const proxy = new Proxy(target,{
//     get(target,key,receiver){

//     },
//     set(target,key,value,receiver){

//     }
// })

export { 
    reactive

};